<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>安企神软件绘制</title>
    <style>
        canvas {
            border: 1px solid black;
        }
    </style>
</head>

<body>
    <canvas id="myCanvas" width="800" height="400"></canvas>
    <script>
        // 获取canvas上下文
        const canvas = document.getElementById('myCanvas');
        const ctx = canvas.getContext('2d');

        // 定义字和词语数组
        const words = ['安', '企', '神', '软件', '安全', '企事业', '神速', '应用', '科技', '创新'];

        // 文字属性设置
        ctx.font = "20px Arial";
        ctx.fillStyle = "black";

        // 定义"安企神软件"四个字的位置
        const positions = [
            { x: 100, y: 100, text: '安' },
            { x: 200, y: 100, text: '企' },
            { x: 300, y: 100, text: '神' },
            { x: 400, y: 100, text: '软件' }
        ];

        // 绘制"安企神软件"四个字
        positions.forEach(pos => {
            ctx.fillText(pos.text, pos.x, pos.y);
        });

        // 随机绘制词语填充形状
        for (let i = 0; i < 100; i++) {
            const word = words[Math.floor(Math.random() * words.length)];
            const x = Math.random() * canvas.width;
            const y = Math.random() * canvas.height;
            ctx.fillText(word, x, y);
        }

    </script>

</body>

</html>